from flask import Flask
from flask_cors import CORS
from APP.forms.login_form import LoginForm
from APP.rate_limit import limiter_webcrt
from APP.views import init_views
from APP.views.web_crt_view import web_crt_pb

def create_app():
    app = Flask(__name__)
    app.config['SECRET_KEY'] = 'SECRET_KEY'
    #ajax 跨域请求
    CORS(app, resources={r"/*": {"origins": "*"}})
    limiter_webcrt.init_app(app)
    init_views(app)
    return app
